Optimal. Leaf size=136 \[ -\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {i b d^2 \log \left (c^2 x^2+1\right )}{3 c^2}+\frac {3 b d^2 \tan ^{-1}(c x)}{4 c^2}+\frac {1}{12} b c d^2 x^3-\frac {3 b d^2 x}{4 c}-\frac {1}{3} i b d^2 x^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {43, 4872, 12, 1802, 635, 203, 260} \[ -\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {i b d^2 \log \left (c^2 x^2+1\right )}{3 c^2}+\frac {3 b d^2 \tan ^{-1}(c x)}{4 c^2}+\frac {1}{12} b c d^2 x^3-\frac {3 b d^2 x}{4 c}-\frac {1}{3} i b d^2 x^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 203
Rule 260
Rule 635
Rule 1802
Rule 4872
Rubi steps
\begin {align*} \int x (d+i c d x)^2 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-(b c) \int \frac {d^2 x^2 \left (6+8 i c x-3 c^2 x^2\right )}{12 \left (1+c^2 x^2\right )} \, dx\\ &=\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{12} \left (b c d^2\right ) \int \frac {x^2 \left (6+8 i c x-3 c^2 x^2\right )}{1+c^2 x^2} \, dx\\ &=\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{12} \left (b c d^2\right ) \int \left (\frac {9}{c^2}+\frac {8 i x}{c}-3 x^2+\frac {i (9 i-8 c x)}{c^2 \left (1+c^2 x^2\right )}\right ) \, dx\\ &=-\frac {3 b d^2 x}{4 c}-\frac {1}{3} i b d^2 x^2+\frac {1}{12} b c d^2 x^3+\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {\left (i b d^2\right ) \int \frac {9 i-8 c x}{1+c^2 x^2} \, dx}{12 c}\\ &=-\frac {3 b d^2 x}{4 c}-\frac {1}{3} i b d^2 x^2+\frac {1}{12} b c d^2 x^3+\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} \left (2 i b d^2\right ) \int \frac {x}{1+c^2 x^2} \, dx+\frac {\left (3 b d^2\right ) \int \frac {1}{1+c^2 x^2} \, dx}{4 c}\\ &=-\frac {3 b d^2 x}{4 c}-\frac {1}{3} i b d^2 x^2+\frac {1}{12} b c d^2 x^3+\frac {3 b d^2 \tan ^{-1}(c x)}{4 c^2}+\frac {1}{2} d^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{3} i c d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{4} c^2 d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {i b d^2 \log \left (1+c^2 x^2\right )}{3 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 101, normalized size = 0.74 \[ \frac {d^2 \left (c x \left (a c x \left (-3 c^2 x^2+8 i c x+6\right )+b \left (c^2 x^2-4 i c x-9\right )\right )+4 i b \log \left (c^2 x^2+1\right )+b \left (-3 c^4 x^4+8 i c^3 x^3+6 c^2 x^2+9\right ) \tan ^{-1}(c x)\right )}{12 c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 148, normalized size = 1.09 \[ -\frac {6 \, a c^{4} d^{2} x^{4} - {\left (16 i \, a + 2 \, b\right )} c^{3} d^{2} x^{3} - 4 \, {\left (3 \, a - 2 i \, b\right )} c^{2} d^{2} x^{2} + 18 \, b c d^{2} x - 17 i \, b d^{2} \log \left (\frac {c x + i}{c}\right ) + i \, b d^{2} \log \left (\frac {c x - i}{c}\right ) - {\left (-3 i \, b c^{4} d^{2} x^{4} - 8 \, b c^{3} d^{2} x^{3} + 6 i \, b c^{2} d^{2} x^{2}\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{24 \, c^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 141, normalized size = 1.04 \[ -\frac {c^{2} d^{2} a \,x^{4}}{4}+\frac {2 i c \,d^{2} a \,x^{3}}{3}+\frac {d^{2} a \,x^{2}}{2}-\frac {c^{2} d^{2} b \arctan \left (c x \right ) x^{4}}{4}+\frac {2 i c \,d^{2} b \arctan \left (c x \right ) x^{3}}{3}+\frac {d^{2} b \arctan \left (c x \right ) x^{2}}{2}-\frac {3 b \,d^{2} x}{4 c}+\frac {b c \,d^{2} x^{3}}{12}-\frac {i b \,d^{2} x^{2}}{3}+\frac {i b \,d^{2} \ln \left (c^{2} x^{2}+1\right )}{3 c^{2}}+\frac {3 b \,d^{2} \arctan \left (c x \right )}{4 c^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 155, normalized size = 1.14 \[ -\frac {1}{4} \, a c^{2} d^{2} x^{4} + \frac {2}{3} i \, a c d^{2} x^{3} - \frac {1}{12} \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c^{2} d^{2} + \frac {1}{3} i \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b c d^{2} + \frac {1}{2} \, a d^{2} x^{2} + \frac {1}{2} \, {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d^{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.68, size = 125, normalized size = 0.92 \[ \frac {\frac {d^2\,\left (9\,b\,\mathrm {atan}\left (c\,x\right )+b\,\ln \left (c^2\,x^2+1\right )\,4{}\mathrm {i}\right )}{12}-\frac {3\,b\,c\,d^2\,x}{4}}{c^2}+\frac {d^2\,\left (6\,a\,x^2+6\,b\,x^2\,\mathrm {atan}\left (c\,x\right )-b\,x^2\,4{}\mathrm {i}\right )}{12}-\frac {c^2\,d^2\,\left (3\,a\,x^4+3\,b\,x^4\,\mathrm {atan}\left (c\,x\right )\right )}{12}+\frac {c\,d^2\,\left (a\,x^3\,8{}\mathrm {i}+b\,x^3+b\,x^3\,\mathrm {atan}\left (c\,x\right )\,8{}\mathrm {i}\right )}{12} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.84, size = 240, normalized size = 1.76 \[ - \frac {a c^{2} d^{2} x^{4}}{4} - \frac {3 b d^{2} x}{4 c} - \frac {b d^{2} \left (\frac {i \log {\left (67 b c d^{2} x - 67 i b d^{2} \right )}}{24} - \frac {31 i \log {\left (67 b c d^{2} x + 67 i b d^{2} \right )}}{60}\right )}{c^{2}} - x^{3} \left (- \frac {2 i a c d^{2}}{3} - \frac {b c d^{2}}{12}\right ) - x^{2} \left (- \frac {a d^{2}}{2} + \frac {i b d^{2}}{3}\right ) + \left (\frac {i b c^{2} d^{2} x^{4}}{8} + \frac {b c d^{2} x^{3}}{3} - \frac {i b d^{2} x^{2}}{4}\right ) \log {\left (i c x + 1 \right )} - \frac {\left (15 i b c^{4} d^{2} x^{4} + 40 b c^{3} d^{2} x^{3} - 30 i b c^{2} d^{2} x^{2} - 23 i b d^{2}\right ) \log {\left (- i c x + 1 \right )}}{120 c^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________